/ Assembly List / LJCNetCommon / LJCAssemblyReflect / GetPropertySyntax

Namespace - LJCNetCommon


Parameters
propertyInfo - The PropertyInfo object.

Returns

The syntax string.

Syntax

C#
public String GetPropertySyntax(PropertyInfo propertyInfo = null)

Creates and returns the Property syntax string. (E)

Example

C#
using System;
using System.Reflection;
using LJC.Net.Common;

public string RetrievePropertySyntax(string assemblyFileSpec, string fullTypeName
  , string propertyName, string fullName)
{
  string retValue = null;

  // These calls are not required if an LJCAssemblyReflect reference is
  // used and the the following set methods have already been executed.
  LJCAssemblyReflect assemblyReflect = new LJCAssemblyReflect();
  assemblyReflect.SetAssembly(assemblyFileSpec);
  assemblyReflect.SetTypeReference(fullTypeName);
  assemblyReflect.SetPropertyInfo(propertyName, fullName);
    
  retValue = assemblyReflect.GetPropertySyntax();
  return retValue;
}

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.